package com.woohua.demo.command;

/***
 * @title CommandPatternDemo
 * @description
 * @author baiji
 * @version 1.0.0
 * @create 2023/6/5 11:30
 **/
public class CommandPatternDemo {

    public static void main(String[] args) {
        Stock abcStock = new Stock();

        BuyOrder buyOrder = new BuyOrder(abcStock);
        SellOrder sellOrder = new SellOrder(abcStock);

        Broker broker = new Broker();
        broker.takeOrder(buyOrder);
        broker.takeOrder(sellOrder);
        broker.placeOrders();
    }
}
